home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / utility / ffe101.zip / SOUND.SWG / 0034_ROL.pas < prev    next >
Pascal/Delphi Source File  |  1997-03-02  |  4KB  |  121 lines

  1. From plaiho@vipunen (Pertti V P Laiho) Mon Jan  4 14:41:14 1993
  2. X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
  3.     ["2974" "Sun" "3" "January" "1993" "12:18:18" "GMT" "Pertti V P Laiho" "plaiho@vipunen.hut.fi " nil "90" "Re: ___ ROL format ___" "^From:" nil nil "1"])
  4. Newsgroups: comp.music
  5. Message-ID: <1993Jan3.121818.19942@nntp.hut.fi>
  6. Nntp-Posting-Host: vipunen.hut.fi
  7. Reply-To: plaiho@vipunen.hut.fi (Pertti V P Laiho)
  8. Organization: Helsinki University of Technology
  9. References: <721@vercors.frec.bull.fr>
  10. Lines: 90
  11. From: plaiho@vipunen.hut.fi (Pertti V P Laiho)
  12. Subject: Re: ___ ROL format ___
  13. Date: Sun, 3 Jan 1993 12:18:18 GMT
  14.  
  15. In article <721@vercors.frec.bull.fr> frank@mapd.frec.bull.fr () writes:
  16. >Does anyone have the details of .ROL files used by AdLib and compatible
  17. >cards on PC? I need it for my Turbo C ROL editor...
  18. >Thanx.
  19.  
  20. OK. Here it is...
  21.  
  22.  
  23. From: holmes@mrx.webo.dg.com (Chris Holmes)
  24. Subject: Adlib .ROL file format
  25. Date: Wed, 26 Aug 92 12:04:43 GMT
  26.  
  27. I requested this a while back and got a couple of requests for a summary,
  28. so here goes:
  29.  
  30. Files containing note information (i.e. songs) are suffixed with ".ROL".
  31. ("File version" and "editing scale" are non-musical information used by Visual
  32. Composer (TM).)
  33.  
  34. Structure of .ROL files:
  35. __________________________________________________________________
  36.  
  37. fld #   size   type     description
  38.         (bytes)
  39.  
  40. 1       2       int     file version, major
  41. 2       2       int     file version, minor
  42. 3       40      char    unused
  43. 4       2       int     ticks per beat
  44. 5       2       int     beats per measure
  45. 6       2       int     editing scale (Y axis)
  46. 7       2       int     editing scale (X axis)
  47. 8       1       char    unused
  48. 9       1       char    0 = percussive mode
  49.                         1 = melodic mode
  50. 10      90      char    unused
  51. 11      38      char    filler
  52. 12      15      char    filler
  53. 13      4       float   basic tempo
  54.  
  55. Field 14 indicates the number of times to repeat fields 15 and 16:
  56.  
  57. 14      2       int     number of tempo events
  58. 15      2       int     time of events, in ticks
  59. 16      4       float   tempo multiplier (0.01 - 10.0)
  60.  
  61. The remaining fields (17 to 34) are to be repeated for each of 11 voices:
  62.  
  63. 17      15      char    filler
  64. 18      2       int     time (in ticks) of last note +1
  65.  
  66. Repeat the next two fields (19 and 20) while the summation of field 20 is
  67. less than the value of field 18:
  68.  
  69. 19      2       int     note number: 0 => silence
  70.                         from 12 to 107 => normal note (you must
  71.                         subtract 60 to obtain the correct value
  72.                         for the sound driver)
  73. 20      2       int     note duration, in ticks
  74. 21      15      char    filler
  75.  
  76. Field 22 indicates the number of times to repeat fields 23 to 26:
  77.  
  78. 22      2       int     number of instrument events
  79. 23      2       int     time of events, in ticks
  80. 24      9       char    instrument name
  81. 25      1       char    filler
  82. 26      2       int     unused
  83. 27      15      char    filler
  84.  
  85. Field 28 indicates the number of times to repeat fields 29 and 30:
  86.  
  87. 28      2       int     number of volume events
  88. 29      2       int     time of events, in ticks
  89. 30      4       float   volume multiplier (0.0 - 1.0)
  90. 31      15      char    filler
  91.  
  92. Field 32 indicates the number of times to repeat fields 33 and 34:
  93.  
  94. 32      2       int     number of pitch events
  95. 33      2       int     time of events, in ticks
  96. 34      4       float   pitch variation (0.0 - 2.0, nominal is 1.0)
  97.  
  98. Notes
  99. _____
  100.  
  101. Fields #1 and #2 should be set to 0 and 4 respectively. Field #10 should
  102. be filled with zeros.
  103.  
  104. PS:
  105. a 4 byte 'float' in the 80x86 family look like follows:
  106.  
  107. Sign   biased
  108. -bit  exponent  significant
  109.  31    30..23     22..0
  110.                ^
  111.                 `- here an implicite "1." is assumed
  112.                exponent bias = 127 (0x7F)
  113.  
  114. eg. 0.5 = 1* 2^(-1) ==> sign=0, exp=127-1, signif=(1.)0000000
  115.  
  116. 10987654 32109876 54321098 76543210
  117. 33222222 22221111 11111100 00000000
  118. 0         0000000 00000000 00000000
  119.  0111111 0
  120. -----------------------------------------------------------------
  121.